# -*- coding: utf-8 -*-
# 创建时间：2021/7/16 15:49
from bs4 import BeautifulSoup
import requests
import time, math, random, json
import pymysql
import re
import time
from threading import Timer
from datetime import datetime

__author__ = 'LuckyHhy'

from day01.MyTimer import MyTimer


def sleeptime(hour, min, sec):
    return hour * 3600 + min * 60 + sec


def hello( name, age ):
  print( "[%s]\thello %s: %d\n" % ( datetime.now().strftime("%Y%m%d %H:%M:%S"), name, age ) )



def main():
    start = datetime.now().replace(minute=3, second=0, microsecond=0)
    # 调用mytimer 类 每隔6秒执行一次
    tmr = MyTimer(start, 6, hello, ["owenliu", 18])  # 时间单位秒
    tmr.start()

    #关闭定时器
    #tmr.cancel()

if __name__ == '__main__':
    main()
